def intToHexStr(num):
    '''
    把十进制转换16进制的字符串（无0x）
    '''
    s = hex(num)
    print("s",s)
    s = s[2:]
    if len(s) == 1:
        s = '0' + s
    return s

print(intToHexStr(6))